package com.sora.pipeline.domain.dto;

import jakarta.validation.constraints.*;
import lombok.Data;

/**
 * 巡检计划创建/更新请求DTO
 * 
 * @author system
 * @since 2025-01-20
 */
@Data
public class InspectionPlanRequest {
    
    /**
     * 计划名称
     */
    @NotBlank(message = "计划名称不能为空")
    @Size(min = 2, max = 50, message = "计划名称长度必须在2-50字符之间")
    private String name;
    
    /**
     * 线路ID
     */
    @NotNull(message = "线路ID不能为空")
    private Long lineId;
    
    /**
     * 负责人ID
     */
    @NotNull(message = "负责人ID不能为空")
    private Long assigneeId;
    
    /**
     * 巡检周期：daily/weekly/monthly/custom
     */
    @NotBlank(message = "巡检周期不能为空")
    @Pattern(regexp = "^(daily|weekly|monthly|custom)$", message = "巡检周期只能是daily/weekly/monthly/custom")
    private String cycle;
    
    /**
     * 状态：active/disabled
     */
    @Pattern(regexp = "^(active|disabled)$", message = "状态只能是active/disabled")
    private String status;
    
    /**
     * 描述
     */
    @Size(max = 500, message = "描述长度不能超过500字符")
    private String description;
}
